Skip to content

Updated String library to use C++11 iterators. #2267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2016
Merged

Updated String library to use C++11 iterators. #2267

merged 1 commit into from
Jul 18, 2016

Conversation

middelink
Copy link
Contributor

This will allow using the String library in a ranged for loop:

String s("Hi, this is a test");

for (const char& ch : s) {
  Serial.print(ch);
}

and even modify

String s("Hi, this is another test");

for (char& ch : s) {
  ch++;
}
Serial.println(s);

This will allow using the String library in a ranged for loop:

```C++
String s("Hi, this is a test");

for (const char& ch : s) {
  Serial.print(ch);
}
```

and even modify

```C++
String s("Hi, this is another test");

for (char& ch : s) {
  ch++;
}
Serial.println(s);
```
@codecov-io
Copy link

Current coverage is 27.74%

Merging #2267 into master will decrease coverage by 0.01%

@@             master      #2267   diff @@
==========================================
  Files            20         20          
  Lines          3641       3640     -1   
  Methods         334        334          
  Messages          0          0          
  Branches        675        675          
==========================================
- Hits           1011       1010     -1   
  Misses         2452       2452          
  Partials        178        178          

Powered by Codecov. Last updated by 07f4d4c...f61e37a

@middelink
Copy link
Contributor Author

It's a "fix" for #2224

@igrr igrr merged commit 3f1ab1f into esp8266:master Jul 18, 2016
slaff pushed a commit to slaff/Sming that referenced this pull request May 30, 2017
slaff added a commit to SmingHub/Sming that referenced this pull request Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants